This folder contains the code required to build the figures and tables
that appear in Appendix D.

The provided makefiles show which source files have to be run and in
what order.  Running make in this directory will rerun all of
the necessary code.  Note that the routines are computationally
intensive. Running all of it may take several days to complete.

The resulting pdf and tex files present the tables and figures that
appear in appendix D.

In particular:  

* ./fits/2010_CCES_Module/cces2010module_perplexity.tex
  contains Table A4,

* ./model_fit/all_survey_perplexity.tex contains Table A5,

* ./fits/2010_CCES_Module/two_dim_nomix.pdf and
  ./fits/2010_CCES_Module/two_dim_nomix_sim.pdf
  contain the panels of Figure A4, and

* ./fits/2010_CCES_Module/weights_1d_vs_2d.pdf contains Figure A5.

Run using R version 4.1.2 on a MBP (x86_64-apple-darwin17.0)
and the following R packages (available on CRAN except where noted): 
     * aroma.light (version 3.22.0, https://bioconductor.org/packages/release/bioc/html/aroma.light.html)
     * dplyr (version 1.0.8)
     * gtools (version 3.9.2)
     * haven (version 2.4.1)
     * kableExtra (version 1.3.4)
     * multidplyr (version 0.1.0)
     * Rcpp (version 1.0.7)
     * tidyverse (version 1.3.1)
     * tictoc (version 1.0.1)
